function generateDateArray() {
  const dates = []
  const today = new Date()

  for (let i = 0; i <= 6; i++) {
    const date = new Date(today)
    date.setDate(today.getDate() - i) // 减去i天

    // 格式化日期为“月/日”
    const month = String(date.getMonth() + 1).padStart(2, '0')
    const day = String(date.getDate()).padStart(2, '0')
    const formattedDate = `${month}/${day}`

    dates.push(formattedDate)
  }

  return dates
}
export default generateDateArray
